Skip to content

Comments

Snake game added #21

Open
Ayush3941 wants to merge 5 commits intoaviralshukla12:mainfrom
Ayush3941:snake
Open

Snake game added #21
Ayush3941 wants to merge 5 commits intoaviralshukla12:mainfrom
Ayush3941:snake

Conversation

@Ayush3941
Copy link

@Ayush3941 Ayush3941 commented Aug 3, 2025

🚀 PR: Add Polished Snake Game with GUI and Persistent High Score

#22

✅ Features Implemented:

  • Modern Tkinter-based Snake Game UI
  • Responsive movement using arrow keys
  • Food spawning with collision avoidance
  • Real-time score and high score display
  • Persistent high score saved in snake_game_save.json
  • Smooth game loop with after() callback
  • Auto game over detection on collision
  • Restart button with state reset

📁 File Structure:

📄 snake/snake_game.py          # Main game logic and UI
📄 snake/snake_game_save.json   # Auto-generated save file (high score)

🧠 Design Considerations:

  • Minimalist retro look with soft color contrast
  • Configurable grid size and cell size for scalability
  • Separate UI layer (labels/buttons) and canvas for rendering

🔜 Future Improvements (Not in Scope):

  • Pause/Resume functionality
  • Power-ups, obstacles, or multiple difficulty levels
  • Kivy or PyGame migration for mobile/animation enhancements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant